package rxb.demo.nyzservice.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import rxb.demo.nyzentity.User;
import rxb.demo.mapper.UserMapper;
import rxb.demo.nyzservice.IUserService;

/**
 *  业务逻辑层 - 处理数据 - 数据来自于db(由mapper)
 *
 *  service肯定是调用mapper
 */
@Service
public class UserServiceImpl implements IUserService{

    @Autowired
    private UserMapper userMapper;

    /**
     * 业务逻辑代码。。。
     * @param username
     * @return
     */
    @Override
    public User nyz2(String username) {
        //开发的核心就是service层。。。
        return userMapper.findByUsername(username);
    }

}

